package com.cy.pj.eiems.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cy.pj.eiems.dao.SysUserCommentDao;
import com.cy.pj.eiems.entity.SysUserCommentVo;
import com.cy.pj.eiems.service.SysUserCommentService;
import com.cy.pj.eiems.vo.PageObject;

@Service
public class SysUserCommentServiceIml implements SysUserCommentService {
	@Autowired
	SysUserCommentDao sysUserCommentDao;

	@Override
	public PageObject<SysUserCommentVo> findUserComments(String username, Integer pageCurrent) {
		int rowCount = sysUserCommentDao.getRowcount();
		//3.查询当前页记录
		int pageSize=2;
		int startIndex=(pageCurrent-1)*pageSize;
		
		List<SysUserCommentVo> records=
		sysUserCommentDao.findUserComments();
		//4.对查询结果进行封装并返回
		return new PageObject<>(1, pageSize, rowCount, records);
	
}
}